﻿#Region "License & Usage"

'Microsoft Public License (Ms-PL) 

'This license governs use of the accompanying software. If you use the 
'software, you accept this license. If you do not accept the license, do 
'not use the software. 

'1. Definitions 

'The terms "reproduce," "reproduction," "derivative works," and 
'"distribution" have the same meaning here as under U.S. copyright law. 

'A "contribution" is the original software, or any additions or changes 
'to the software. 

'A "contributor" is any person that distributes its contribution under 
'this license. 

'"Licensed patents" are a contributor's patent claims that read directly 
'on its contribution. 

'2. Grant of Rights 

'(A) Copyright Grant- Subject to the terms of this license, including the 
'license conditions and limitations in section 3, each contributor grants 
'you a non-exclusive, worldwide, royalty-free copyright license to 
'reproduce its contribution, prepare derivative works of its 
'contribution, and distribute its contribution or any derivative works 
'that you create. 

'(B) Patent Grant- Subject to the terms of this license, including the 
'license conditions and limitations in section 3, each contributor grants 
'you a non-exclusive, worldwide, royalty-free license under its licensed 
'patents to make, have made, use, sell, offer for sale, import, and/or 
'otherwise dispose of its contribution in the software or derivative 
'works of the contribution in the software. 

'3. Conditions and Limitations 

'(A) No Trademark License- This license does not grant you rights to use 
'any contributors' name, logo, or trademarks. 

'(B) If you bring a patent claim against any contributor over patents 
'that you claim are infringed by the software, your patent license from 
'such contributor to the software ends automatically. 

'(C) If you distribute any portion of the software, you must retain all 
'copyright, patent, trademark, and attribution notices that are present 
'in the software. 

'(D) If you distribute any portion of the software in source code form, 
'you may do so only under this license by including a complete copy of 
'this license with your distribution. If you distribute any portion of 
'the software in compiled or object code form, you may only do so under a 
'license that complies with this license. 

'(E) The software is licensed "as-is." You bear the risk of using it. The 
'contributors give no express warranties, guarantees or conditions. You 
'may have additional consumer rights under your local laws which this 
'license cannot change. To the extent permitted under your local laws, 
'the contributors exclude the implied warranties of merchantability, 
'fitness for a particular purpose and non-infringement.

#End Region

#Region "Options"

Option Strict On
Option Explicit On

#End Region

#Region "Imports"

'From .Net Framework 3.5
Imports Microsoft.Drawing
Imports System.Drawing
Imports System.IO
Imports System.Windows.Forms

'From Custom Classes/Reference
Imports StedySoft.SenseSDK
Imports StedySoft.SenseSDK.DrawingCE
Imports SenseSDKExtended.DrawingCEEx

#End Region

Namespace SensePanelOnOffItemEx

    Public Class Style1
        Inherits SensePanelBase
        Implements IDisposable

#Region "Fields"

        'General Flags
        Private _disposed As Boolean = False
        Private _clickedUP As Boolean = False
        Private _clickedDW As Boolean = False

        'General Properties
        Private _name As String = Nothing

        Private _enabled As Boolean = True
        Private _status As ItemStatus = ItemStatus.Off

        'PrimaryText Properties
        Private _primaryText As String = Nothing
        Private _primaryTextRectangle As Rectangle = Nothing
        Private _primaryTextFontName As String = "Tahoma" '"Helvetica Neue OTS"
        Private _primaryTextFontSize As Single = 9.0F
        Private _primaryTextFontStyle As System.Drawing.FontStyle = FontStyle.Regular
        Private _primaryTextForeColor As System.Drawing.Color = Color.Black
        Private _primaryTextBackColor As System.Drawing.Color = Color.Gray
        Private _primaryTextAlignment As System.Drawing.StringAlignment = StringAlignment.Near

        'SecondaryText Properties
        Private _secondaryText As String = Nothing
        Private _secondaryTextRectangle As Rectangle = Nothing
        Private _secondaryTextFontName As String = "Tahoma" '"Helvetica Neue OTS"
        Private _secondaryTextFontSize As Single = 7.0F
        Private _secondaryTextFontStyle As System.Drawing.FontStyle = FontStyle.Regular
        Private _secondaryTextForeColor As System.Drawing.Color = Color.Black
        Private _secondaryTextBackColor As System.Drawing.Color = Color.Gray
        Private _secondaryTextAlignment As System.Drawing.StringAlignment = StringAlignment.Near

        'Value Left Properties
        Private _valueLeftText As String = "Off"
        Private _valueLeftTextRectangle As Rectangle = Nothing
        Private _valueLeftTextFontName As String = "Tahoma" '"Helvetica Neue OTS"
        Private _valueLeftTextFontSize As Single = 11.0F
        Private _valueLeftTextFontStyle As System.Drawing.FontStyle = FontStyle.Bold
        Private _valueLeftTextForeColor As System.Drawing.Color = Color.Black
        Private _valueLeftTextAlignment As System.Drawing.StringAlignment = StringAlignment.Near
        Private _valueLeftTextEx As Integer = Nothing

        'Value Right Properties
        Private _valueRightText As String = "On"
        Private _valueRightTextRectangle As Rectangle = Nothing
        Private _valueRightTextFontName As String = "Tahoma" '"Helvetica Neue OTS"
        Private _valueRightTextFontSize As Single = 11.0F
        Private _valueRightTextFontStyle As System.Drawing.FontStyle = FontStyle.Bold
        Private _valueRightTextForeColor As System.Drawing.Color = Color.Black
        Private _valueRightTextAlignment As System.Drawing.StringAlignment = StringAlignment.Near
        Private _valueRightTextEx As Integer = Nothing

        Private path_enabled_on As IImage = _getIImageFromResource("onoff.enabled.on")
        Private path_enabled_off As IImage = _getIImageFromResource("onoff.enabled.off")

        Private path_disabled_on As IImage = _getIImageFromResource("onoff.disabled.on")
        Private path_disabled_off As IImage = _getIImageFromResource("onoff.disabled.off")

        Private path_pressed As IImage = _getIImageFromResource("onoff.pressed")

        'Hold Images
        Private _iThumbnailLeft As Microsoft.Drawing.IImage = Nothing
        'Private _iThumbnailRight As Microsoft.Drawing.IImage = Nothing

        'Hold Cordinates
        Private _iThumbnailLeftRectangle As Rectangle = Nothing
        Private _iThumbnailRightRectangle As Rectangle = Nothing

        'Hold Margins
        Private _iThumbnailLeftMarginLR As Double = 0
        Private _iThumbnailLeftMarginTB As Double = 0
        Private _iThumbnailRightMarginLR As Double = 0
        Private _iThumbnailRightMarginTB As Double = 0

        Private _myCurrentPosition As Integer = 0

#End Region

#Region "Events"

        Public Event OnStatusChanged(ByVal Sender As Object, ByVal Status As StedySoft.SenseSDK.ItemStatus)

#End Region

#Region "Methods"

        ''' <summary>
        ''' Constructor
        ''' </summary>
        ''' <remarks>None</remarks>
        Public Sub New()

            Try

                'Do Nothing

            Catch ex As Exception

                'Throw exception if any other error caught
                Throw New Exception(ex.Message)

            End Try

        End Sub

        ''' <summary>
        ''' Constructor
        ''' </summary>
        ''' <remarks>None</remarks>
        Public Sub New(ByVal Name As String)

            Try

                'Save name property
                _name = Name

            Catch ex As Exception

                'Throw exception if any other error caught
                Throw New Exception(ex.Message)

            End Try

        End Sub

        ''' <summary>
        ''' Dispose
        ''' </summary>
        ''' <remarks>None</remarks>
        Public Overrides Sub Dispose()

            Try

                Me._dispose(True)
                GC.SuppressFinalize(Me)
                MyBase.Dispose()

            Catch ex As Exception

                'Throw exception if any other error caught
                Throw New Exception(ex.Message)

            End Try

        End Sub

        ''' <summary>
        ''' _Dispose
        ''' </summary>
        ''' <param name="disposing"></param>
        ''' <remarks>None</remarks>
        Private Sub _dispose(ByVal disposing As Boolean)

            Try

                Me._disposed = True

            Catch ex As Exception

                'Throw exception if any other error caught
                Throw New Exception(ex.Message)

            End Try
        End Sub

        ''' <summary>
        ''' Check if it is VGA or QVGA
        ''' </summary>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Private Function _isVGA() As Boolean

            Try

                'Return the output
                Return StedySoft.SenseSDK.DrawingCE.Resolution.ScreenIsVGA

            Catch ex As Exception

                'Throw exception if any other error caught
                Throw New Exception(ex.Message)

            End Try

        End Function

        ''' <summary>
        ''' _getIImageFromResource
        ''' </summary>
        ''' <param name="resource"></param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Private Function _getIImageFromResource(ByVal resource As String) As IImage
            Dim iimg As IImage = Nothing
            Using strm As MemoryStream = If(_isVGA, SenseSDKExtended.Resources.VGA.Images.GetIImageFromResource(resource), SenseSDKExtended.Resources.QVGA.Images.GetIImageFromResource(resource))
                ImagingFactory.GetImaging.CreateImageFromBuffer(strm.GetBuffer, Convert.ToUInt32(strm.Length), BufferDisposalFlag.BufferDisposalFlagNone, iimg)
            End Using
            Return iimg
        End Function

        Public Overrides Sub OnMouseDown(ByVal x As Integer, ByVal y As Integer, ByRef cancelScroll As Boolean)
            MyBase.OnMouseDown(x, y, cancelScroll)

            If _enabled Then

                _clickedDW = True

            End If

            _myCurrentPosition = y

        End Sub

        Public Overrides Sub OnMouseMove(ByVal x As Integer, ByVal y As Integer)
            MyBase.OnMouseMove(x, y)

            _clickedDW = False

        End Sub

        ''' <summary>
        ''' OnMouseUp
        ''' </summary>
        ''' <param name="x"></param>
        ''' <param name="y"></param>
        ''' <remarks></remarks>
        Public Overrides Sub OnMouseUp(ByVal x As Integer, ByVal y As Integer)
            MyBase.OnMouseUp(x, y)

            _clickedDW = False

            'Check controls current position
            If Not y = _myCurrentPosition Then

                'Then exit sub to avoid raising other events
                Exit Sub

            End If

            If _enabled Then

                If _status = ItemStatus.On Then

                    _status = ItemStatus.Off
                    RaiseEvent OnStatusChanged(Me, ItemStatus.Off)

                Else

                    _status = ItemStatus.On
                    RaiseEvent OnStatusChanged(Me, ItemStatus.On)

                End If

            End If

        End Sub

        Public Overrides Sub OnRender(ByVal g As System.Drawing.Graphics)
            MyBase.OnRender(g)

            Dim _iThumbnailLeftMarginLR As Integer = If(_isVGA, 20, 10)
            Dim _iThumbnailLeftMarginTB As Integer = If(_isVGA, 20, 10)
            Dim _iThumbnailLeftX As Integer = If(_isVGA, 10, 5)
            Dim _iThumbnailLeftY As Integer = If(_isVGA, 10, 5)
            Dim _iThumbnailLeftW As Integer = If(Not _iThumbnailLeft Is Nothing, SenseAPIs.SenseImage.GetIImageSize(_iThumbnailLeft).Width + _iThumbnailLeftMarginLR, If(_isVGA, 10, 5))
            Dim _iThumbnailLeftH As Integer = If(Not _iThumbnailLeft Is Nothing, SenseAPIs.SenseImage.GetIImageSize(_iThumbnailLeft).Height, 0)

            Dim _iThumbnailRightMarginLR As Integer = If(_isVGA, 20, 10)
            Dim _iThumbnailRightMarginTB As Integer = If(_isVGA, 20, 10)
            Dim _iThumbnailRightX As Integer = If(_isVGA, 10, 5)
            Dim _iThumbnailRightY As Integer = If(_isVGA, 10, 5)
            Dim _iThumbnailRightW As Integer = If(_isVGA, 96, 48) + _iThumbnailRightMarginLR
            Dim _iThumbnailRightH As Integer = If(_isVGA, 68, 34)

            Dim _primaryTextMarginTB As Integer = If(_isVGA, 20, 10)
            Dim _primaryTextX As Integer = _iThumbnailLeftW
            Dim _primaryTextY As Integer = If(_isVGA, 10, 5)
            Dim _primaryTextW As Integer = Screen.PrimaryScreen.Bounds.Width - (_iThumbnailLeftW + _iThumbnailRightW)
            Dim _primaryTextH As Integer = SenseAPIsEx.SenseStrings.CalculateStringHeight(SenseAPIsEx.SenseStrings.GetTrimmedDottedText(_primaryText, _primaryTextFontName, CInt(_primaryTextFontSize), _primaryTextFontStyle, New Size(_primaryTextW, _primaryTextH), g), _primaryTextFontName, CInt(_primaryTextFontSize), _primaryTextFontStyle, New Size(_primaryTextW, Nothing))

            Dim _secondaryTextMarginTB As Integer = If(_isVGA, 20, 10)
            Dim _secondaryTextX As Integer = _iThumbnailLeftW
            Dim _secondaryTextY As Integer = _primaryTextH + If(_isVGA, 10, 5)
            Dim _secondaryTextW As Integer = Screen.PrimaryScreen.Bounds.Width - (_iThumbnailLeftW + _iThumbnailRightW)
            Dim _secondaryTextH As Integer = SenseAPIsEx.SenseStrings.CalculateStringHeight(SenseAPIsEx.SenseStrings.GetTrimmedDottedText(_secondaryText, _secondaryTextFontName, CInt(_secondaryTextFontSize), _secondaryTextFontStyle, New Size(_secondaryTextW, _secondaryTextH), g), _secondaryTextFontName, CInt(_secondaryTextFontSize), _secondaryTextFontStyle, New Size(_secondaryTextW, Nothing))

            _primaryTextRectangle = New Rectangle(_primaryTextX, _primaryTextY, _primaryTextW, _primaryTextH)
            _secondaryTextRectangle = New Rectangle(_secondaryTextX, _secondaryTextY, _secondaryTextW, _secondaryTextH)

            If Not _iThumbnailLeft Is Nothing Then

                _iThumbnailLeftRectangle = New Rectangle(ClientRectangle.Left + If(_isVGA, 10, 5), ClientRectangle.Top + CInt((ClientRectangle.Height - SenseAPIs.SenseImage.GetIImageSize(_iThumbnailLeft).Height) / 2), SenseAPIs.SenseImage.GetIImageSize(_iThumbnailLeft).Width, SenseAPIs.SenseImage.GetIImageSize(_iThumbnailLeft).Height)
                _iThumbnailLeftMarginTB = If(_isVGA, 10, 5)
                _iThumbnailLeftMarginLR = If(_isVGA, 10, 5)

                Dim ___iThumbnailLeft As IImage = _iThumbnailLeft
                g.DrawImageAlphaChannel(___iThumbnailLeft, New Rectangle(CInt(_iThumbnailLeftRectangle.Left), CInt(_iThumbnailLeftRectangle.Top), _iThumbnailLeftRectangle.Width, _iThumbnailLeftRectangle.Height))

            End If

            _iThumbnailRightRectangle = New Rectangle(Screen.PrimaryScreen.Bounds.Width - (SenseAPIs.SenseImage.GetIImageSize(path_enabled_on).Width + If(_isVGA, 10, 5)), ClientRectangle.Top + CInt((ClientRectangle.Height - SenseAPIs.SenseImage.GetIImageSize(path_enabled_on).Height) / 2), SenseAPIs.SenseImage.GetIImageSize(path_enabled_on).Width, SenseAPIs.SenseImage.GetIImageSize(path_enabled_on).Height)
            _iThumbnailRightMarginTB = If(_isVGA, 10, 5)
            _iThumbnailRightMarginLR = If(_isVGA, 10, 5)

            Try

                If _enabled Then

                    If _clickedDW Then

                        g.DrawImageAlphaChannel(path_pressed, New Rectangle(CInt(_iThumbnailRightRectangle.Left), CInt(_iThumbnailRightRectangle.Top), _iThumbnailRightRectangle.Width, _iThumbnailRightRectangle.Height))

                    Else

                        If _status = ItemStatus.On Then

                            g.DrawImageAlphaChannel(path_enabled_on, New Rectangle(CInt(_iThumbnailRightRectangle.Left), CInt(_iThumbnailRightRectangle.Top), _iThumbnailRightRectangle.Width, _iThumbnailRightRectangle.Height))
                            '_status = ItemStatus.Off

                        Else

                            g.DrawImageAlphaChannel(path_enabled_off, New Rectangle(CInt(_iThumbnailRightRectangle.Left), CInt(_iThumbnailRightRectangle.Top), _iThumbnailRightRectangle.Width, _iThumbnailRightRectangle.Height))
                            '_status = ItemStatus.On

                        End If

                    End If

                Else

                    MyBase.Enabled = False
                    MyBase.ButtonAnimation = False

                    If _status = ItemStatus.On Then

                        g.DrawImageAlphaChannel(path_disabled_on, New Rectangle(CInt(_iThumbnailRightRectangle.Left), CInt(_iThumbnailRightRectangle.Top), _iThumbnailRightRectangle.Width, _iThumbnailRightRectangle.Height))

                    Else

                        g.DrawImageAlphaChannel(path_disabled_off, New Rectangle(CInt(_iThumbnailRightRectangle.Left), CInt(_iThumbnailRightRectangle.Top), _iThumbnailRightRectangle.Width, _iThumbnailRightRectangle.Height))

                    End If

                End If

                If Not _primaryText = String.Empty Then
                    'Draw the Primary text with other properties like height,color,style,alignment,etc
                    Using f As Font = New Font(_primaryTextFontName, _primaryTextFontSize, _primaryTextFontStyle)
                        Dim s As String = SenseAPIsEx.SenseStrings.GetTrimmedDottedText(_primaryText, _primaryTextFontName, CInt(_primaryTextFontSize), _primaryTextFontStyle, New Size(_primaryTextRectangle.Width, _primaryTextRectangle.Height), g)
                        Dim r As Rectangle = New Rectangle(_primaryTextRectangle.Left, ClientRectangle.Top + _primaryTextRectangle.Top, _primaryTextRectangle.Width, _primaryTextRectangle.Height) '(Left,Top,Width,Height)
                        Using b As Brush = New SolidBrush(If(_clickedDW, Color.White, _primaryTextForeColor))
                            Using sf As StringFormat = New StringFormat()
                                sf.Alignment = _primaryTextAlignment
                                sf.FormatFlags = StringFormatFlags.NoWrap
                                g.DrawString(s, f, b, r, sf)
                            End Using
                        End Using
                    End Using
                End If

                If Not _secondaryText = String.Empty Then
                    'Draw the Secondary text with other properties like height,color,style,alignment,etc
                    Using f As Font = New Font(_secondaryTextFontName, _secondaryTextFontSize, _secondaryTextFontStyle)
                        Dim s As String = SenseAPIsEx.SenseStrings.GetTrimmedDottedText(_secondaryText, _secondaryTextFontName, CInt(_secondaryTextFontSize), _secondaryTextFontStyle, New Size(_secondaryTextRectangle.Width, _secondaryTextRectangle.Height), g)
                        Dim r As Rectangle = New Rectangle(_secondaryTextRectangle.Left, ClientRectangle.Top + _secondaryTextRectangle.Top, _secondaryTextRectangle.Width, _secondaryTextRectangle.Height) '(Left,Top,Width,Height)
                        Using b As Brush = New SolidBrush(If(_clickedDW, Color.White, _secondaryTextForeColor))
                            Using sf As StringFormat = New StringFormat()
                                sf.Alignment = _secondaryTextAlignment
                                sf.FormatFlags = StringFormatFlags.NoWrap
                                g.DrawString(s, f, b, r, sf)
                            End Using
                        End Using
                    End Using
                End If

                'Draw Off Text on Image
                Using f As Font = New Font("Helvetica Neue OTS", 7.0F, FontStyle.Regular)
                    Dim s As String = _valueLeftText
                    Dim r As Rectangle = New Rectangle(ClientRectangle.Left + 384, ClientRectangle.Top + 45, 76, 20)
                    Using b As Brush = New SolidBrush(If(_clickedDW, Color.White, _valueLeftTextForeColor))
                        Using sf As StringFormat = New StringFormat()
                            sf.Alignment = StringAlignment.Near
                            g.DrawString(s, f, b, r, sf)
                        End Using
                    End Using
                End Using

                'Draw On Text on Image
                Using f As Font = New Font("Helvetica Neue OTS", 7.0F, FontStyle.Regular)
                    Dim s As String = _valueRightText
                    Dim r As Rectangle = New Rectangle(((ClientRectangle.Left + If(_isVGA, 384, 192))), ClientRectangle.Top + 45, 76, 20)
                    Using b As Brush = New SolidBrush(If(_clickedDW, Color.White, _valueRightTextForeColor))
                        Using sf As StringFormat = New StringFormat()
                            sf.Alignment = StringAlignment.Far
                            g.DrawString(s, f, b, r, sf)
                        End Using
                    End Using
                End Using


            Catch ex As Exception

            End Try


        End Sub

#End Region

#Region "Properties"


        ''' <summary>
        ''' Primary Text
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property PrimaryText() As String
            Get
                Return _primaryText
            End Get
            Set(ByVal value As String)
                _primaryText = value
            End Set
        End Property

        ''' <summary>
        ''' PrimaryTextFontName
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property PrimaryTextFontName() As String
            Get
                Return _primaryTextFontName
            End Get
            Set(ByVal value As String)
                _primaryTextFontName = value
            End Set
        End Property

        ''' <summary>
        ''' PrimaryTextFontSize
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property PrimaryTextFontSize() As Single
            Get
                Return _primaryTextFontSize
            End Get
            Set(ByVal value As Single)
                _primaryTextFontSize = value
            End Set
        End Property

        ''' <summary>
        ''' PrimaryTextFontStyle
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property PrimaryTextFontStyle() As System.Drawing.FontStyle
            Get
                Return _primaryTextFontStyle
            End Get
            Set(ByVal value As System.Drawing.FontStyle)
                _primaryTextFontStyle = value
            End Set
        End Property

        ''' <summary>
        ''' PrimaryTextForeColor
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property PrimaryTextForeColor() As System.Drawing.Color
            Get
                Return _primaryTextForeColor
            End Get
            Set(ByVal value As System.Drawing.Color)
                _primaryTextForeColor = value
            End Set
        End Property

        ''' <summary>
        ''' PrimaryTextBackColor
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property PrimaryTextBackColor() As System.Drawing.Color
            Get
                Return _primaryTextBackColor
            End Get
            Set(ByVal value As System.Drawing.Color)
                _primaryTextBackColor = value
            End Set
        End Property

        ''' <summary>
        ''' PrimaryTextAlignment
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property PrimaryTextAlignment() As System.Drawing.StringAlignment
            Get
                Return _primaryTextAlignment
            End Get
            Set(ByVal value As System.Drawing.StringAlignment)
                _primaryTextAlignment = value
            End Set
        End Property

        ''' <summary>
        ''' Secondary Text
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property SecondaryText() As String
            Get
                Return _secondaryText
            End Get
            Set(ByVal value As String)
                _secondaryText = value
            End Set
        End Property

        ''' <summary>
        ''' SecondaryTextFontName
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property SecondaryTextFontName() As String
            Get
                Return _secondaryTextFontName
            End Get
            Set(ByVal value As String)
                _secondaryTextFontName = value
            End Set
        End Property

        ''' <summary>
        ''' SecondaryTextFontSize
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property SecondaryTextFontSize() As Single
            Get
                Return _secondaryTextFontSize
            End Get
            Set(ByVal value As Single)
                _secondaryTextFontSize = value
            End Set
        End Property

        ''' <summary>
        ''' SecondaryTextFontStyle
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property SecondaryTextFontStyle() As System.Drawing.FontStyle
            Get
                Return _secondaryTextFontStyle
            End Get
            Set(ByVal value As System.Drawing.FontStyle)
                _secondaryTextFontStyle = value
            End Set
        End Property

        ''' <summary>
        ''' SecondaryTextForeColor
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property SecondaryTextForeColor() As System.Drawing.Color
            Get
                Return _secondaryTextForeColor
            End Get
            Set(ByVal value As System.Drawing.Color)
                _secondaryTextForeColor = value
            End Set
        End Property

        ''' <summary>
        ''' SecondaryTextBackColor
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property SecondaryTextBackColor() As System.Drawing.Color
            Get
                Return _secondaryTextBackColor
            End Get
            Set(ByVal value As System.Drawing.Color)
                _secondaryTextBackColor = value
            End Set
        End Property

        ''' <summary>
        ''' SecondaryTextAlignment
        ''' </summary>
        ''' <value></value>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Public Property SecondaryTextAlignment() As System.Drawing.StringAlignment
            Get
                Return _secondaryTextAlignment
            End Get
            Set(ByVal value As System.Drawing.StringAlignment)
                _secondaryTextAlignment = value
            End Set
        End Property

        Public Overloads Property Enabled() As Boolean
            Get
                Return _enabled
            End Get
            Set(ByVal value As Boolean)
                _enabled = value
            End Set
        End Property

        Public Property Status() As ItemStatus
            Get
                Return _status
            End Get
            Set(ByVal value As ItemStatus)
                _status = value
            End Set
        End Property

        Public Property RightText() As String
            Get
                Return _valueRightText
            End Get
            Set(ByVal value As String)
                _valueRightText = value
            End Set
        End Property

        Public Property RightTextForeColor() As System.Drawing.Color
            Get
                Return _valueRightTextForeColor
            End Get
            Set(ByVal value As System.Drawing.Color)
                _valueRightTextForeColor = value
            End Set
        End Property

        Public Property RightTextFontName() As String
            Get
                Return _valueRightTextFontName
            End Get
            Set(ByVal value As String)
                _valueRightTextFontName = value
            End Set
        End Property

        Public Property LeftText() As String
            Get
                Return _valueLeftText
            End Get
            Set(ByVal value As String)
                _valueLeftText = value
            End Set
        End Property

        Public Property LeftTextForeColor() As System.Drawing.Color
            Get
                Return _valueLeftTextForeColor
            End Get
            Set(ByVal value As System.Drawing.Color)
                _valueLeftTextForeColor = value
            End Set
        End Property

        Public Property LeftTextFontName() As String
            Get
                Return _valueLeftTextFontName
            End Get
            Set(ByVal value As String)
                _valueLeftTextFontName = value
            End Set
        End Property

#End Region

    End Class

End Namespace

